﻿<sdk:Page	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:my="clr-namespace:Silverlight.ViewModel"
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"	xmlns:local="clr-namespace:Silverlight"
	xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:System="clr-namespace:System;assembly=mscorlib"
	mc:Ignorable="d"
            x:Name="MainControl"
	x:Class="Silverlight.BackupManagerPage" 
	Title="BackupManager Page" d:DesignWidth="1000" d:DesignHeight="600" >

    <sdk:Page.Resources>
        <my:DownloadBackupVisibilityConverter x:Key="DownloadBackupVisibilityConverter" />
        <my:DateTimeOffsetStringConverter x:Key="DateTimeOffsetStringConverter" />
        <my:NotNullVisibilityConverter x:Key="NotNullVisibilityConverter" />
    	<Style x:Key="TaskScheduleHeaderStyle" TargetType="sdk:DataGridColumnHeader">
    		<Setter Property="Foreground" Value="#FF000000"/>
    		<Setter Property="HorizontalContentAlignment" Value="Left"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="IsTabStop" Value="False"/>
    		<Setter Property="SeparatorBrush" Value="#FFC9CACA"/>
    		<Setter Property="Padding" Value="4"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="sdk:DataGridColumnHeader">
    					<Grid x:Name="Root">
    						<Grid.ColumnDefinitions>
    							<ColumnDefinition/>
    							<ColumnDefinition Width="Auto"/>
    						</Grid.ColumnDefinitions>
    						<VisualStateManager.VisualStateGroups>
    							<VisualStateGroup x:Name="CommonStates">
    								<VisualState x:Name="Normal"/>
    								<VisualState x:Name="MouseOver">
    									<Storyboard>
    										<ColorAnimation Duration="0" To="#FF448DCA" Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="BackgroundRectangle"/>
    										<ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color" Storyboard.TargetName="BackgroundGradient"/>
    										<ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="BackgroundGradient"/>
    										<ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="BackgroundGradient"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Pressed">
    									<Storyboard>
    										<ColorAnimation Duration="0" To="#FF448DCA" Storyboard.TargetProperty="(Fill).Color" Storyboard.TargetName="BackgroundRectangle"/>
    										<ColorAnimation Duration="0" To="#D8FFFFFF" Storyboard.TargetProperty="(Fill).(GradientStops)[0].Color" Storyboard.TargetName="BackgroundGradient"/>
    										<ColorAnimation Duration="0" To="#C6FFFFFF" Storyboard.TargetProperty="(Fill).(GradientStops)[1].Color" Storyboard.TargetName="BackgroundGradient"/>
    										<ColorAnimation Duration="0" To="#8CFFFFFF" Storyboard.TargetProperty="(Fill).(GradientStops)[2].Color" Storyboard.TargetName="BackgroundGradient"/>
    										<ColorAnimation Duration="0" To="#3FFFFFFF" Storyboard.TargetProperty="(Fill).(GradientStops)[3].Color" Storyboard.TargetName="BackgroundGradient"/>
    									</Storyboard>
    								</VisualState>
    							</VisualStateGroup>
    							<VisualStateGroup x:Name="SortStates">
    								<VisualState x:Name="Unsorted"/>
    								<VisualState x:Name="SortAscending"/>
    								<VisualState x:Name="SortDescending"/>
    							</VisualStateGroup>
    						</VisualStateManager.VisualStateGroups>
    						<Rectangle x:Name="BackgroundRectangle" Grid.ColumnSpan="2" Fill="#FF1F3B53" Stretch="Fill"/>
    						<Rectangle x:Name="BackgroundGradient" Grid.ColumnSpan="2" Stretch="Fill">
    							<Rectangle.Fill>
    								<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
    									<GradientStop Color="#FCFFFFFF" Offset="0.015"/>
    									<GradientStop Color="#F7FFFFFF" Offset="0.375"/>
    									<GradientStop Color="#E5FFFFFF" Offset="0.6"/>
    									<GradientStop Color="#D1FFFFFF" Offset="1"/>
    								</LinearGradientBrush>
    							</Rectangle.Fill>
    						</Rectangle>
    						<Grid HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
    							<Grid VerticalAlignment="Top">
    								<Grid.ColumnDefinitions>
    									<ColumnDefinition/>
    									<ColumnDefinition Width="132"/>
    									<ColumnDefinition Width="132"/>
    									<ColumnDefinition/>
    									<ColumnDefinition/>
    								</Grid.ColumnDefinitions>
    								<Grid.RowDefinitions>
    									<RowDefinition Height="Auto"/>
    								</Grid.RowDefinitions>
    								<TextBlock Text="Type" Margin="8,0,0,0" IsHitTestVisible="False" VerticalAlignment="Center"/>
    								<TextBlock Text="Start" Margin="8,0,0,0" IsHitTestVisible="False" VerticalAlignment="Center" Grid.Column="1"/>
    								<TextBlock Text="Time" Margin="8,0,0,0" IsHitTestVisible="False" VerticalAlignment="Center" Grid.Column="2"/>
    							</Grid>
    						</Grid>
    						<Rectangle x:Name="VerticalSeparator" Grid.Column="1" Fill="{TemplateBinding SeparatorBrush}" Visibility="{TemplateBinding SeparatorVisibility}" VerticalAlignment="Stretch" Width="1"/>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>

    	<ControlTemplate x:Key="ValidationToolTipTemplate">
    		<Grid x:Name="Root" RenderTransformOrigin="0,0" Opacity="0" Margin="5,0">
    			<VisualStateManager.VisualStateGroups>
    				<VisualStateGroup x:Name="OpenStates">
    					<VisualStateGroup.Transitions>
    						<VisualTransition GeneratedDuration="0"/>
    						<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
    							<Storyboard>
    								<DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2">
    									<DoubleAnimation.EasingFunction>
    										<BackEase Amplitude=".3" EasingMode="EaseOut"/>
    									</DoubleAnimation.EasingFunction>
    								</DoubleAnimation>
    								<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2"/>
    							</Storyboard>
    						</VisualTransition>
    					</VisualStateGroup.Transitions>
    					<VisualState x:Name="Closed">
    						<Storyboard>
    							<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
    						</Storyboard>
    					</VisualState>
    					<VisualState x:Name="Open">
    						<Storyboard>
    							<DoubleAnimation Storyboard.TargetName="xform" Storyboard.TargetProperty="X" To="0" Duration="0"/>
    							<DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity" To="1" Duration="0"/>
    						</Storyboard>
    					</VisualState>
    				</VisualStateGroup>
    			</VisualStateManager.VisualStateGroups>
    			<Grid.RenderTransform>
    				<TranslateTransform x:Name="xform" X="-25"/>
    			</Grid.RenderTransform>
    			<Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
    			<Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
    			<Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
    			<Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
    			<Border Background="#FFDC000C" CornerRadius="2"/>
    			<Border CornerRadius="2">
    				<TextBlock UseLayoutRounding="false" Text="{Binding (Validation.Errors)[0].ErrorContent}" TextWrapping="Wrap" Margin="8,4,8,4" MaxWidth="250" Foreground="White"/>
    			</Border>
    		</Grid>
    	</ControlTemplate>
    	<Style x:Key="CheckBoxListBoxItemStyle" TargetType="ListBoxItem">
    		<Setter Property="Foreground" Value="#FF000000" />
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="ListBoxItem">
    					<Grid x:Name="RootElement">
    						<CheckBox ClickMode="Press" Content="{Binding Name}"
    							IsChecked="{Binding Selected, Mode=TwoWay}" />
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>

    	<Style x:Key="MultiSelectComboBoxStyle" TargetType="ComboBox">
    		<Setter Property="Padding" Value="6,2,25,2"/>
    		<Setter Property="Background" Value="#FF1F3B53"/>
    		<Setter Property="HorizontalContentAlignment" Value="Left"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="TabNavigation" Value="Once"/>
    		<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    		<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    		<Setter Property="BorderBrush">
    			<Setter.Value>
    				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    					<GradientStop Color="#FFA3AEB9" Offset="0"/>
    					<GradientStop Color="#FF8399A9" Offset="0.375"/>
    					<GradientStop Color="#FF718597" Offset="0.375"/>
    					<GradientStop Color="#FF617584" Offset="1"/>
    				</LinearGradientBrush>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="ComboBox">
    					<Grid>
    						<Grid.Resources>
    							<Style x:Name="comboToggleStyle" TargetType="ToggleButton">
    								<Setter Property="Foreground" Value="#FF333333"/>
    								<Setter Property="Background" Value="#FF1F3B53"/>
    								<Setter Property="BorderBrush">
    									<Setter.Value>
    										<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    											<GradientStop Color="#FFA3AEB9" Offset="0"/>
    											<GradientStop Color="#FF8399A9" Offset="0.375"/>
    											<GradientStop Color="#FF718597" Offset="0.375"/>
    											<GradientStop Color="#FF617584" Offset="1"/>
    										</LinearGradientBrush>
    									</Setter.Value>
    								</Setter>
    								<Setter Property="BorderThickness" Value="1"/>
    								<Setter Property="Padding" Value="3"/>
    								<Setter Property="Template">
    									<Setter.Value>
    										<ControlTemplate TargetType="ToggleButton">
    											<Grid>
    												<VisualStateManager.VisualStateGroups>
    													<VisualStateGroup x:Name="CommonStates">
    														<VisualState x:Name="Normal"/>
    														<VisualState x:Name="MouseOver">
    															<Storyboard>
    																<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundOverlay"/>
    																<ColorAnimation Duration="0" To="#7FFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
    																<ColorAnimation Duration="0" To="#CCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
    																<ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
    															</Storyboard>
    														</VisualState>
    														<VisualState x:Name="Pressed">
    															<Storyboard>
    																<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="BackgroundOverlay2"/>
    																<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
    																<ColorAnimation Duration="0" To="#E5FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
    																<ColorAnimation Duration="0" To="#BCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
    																<ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
    																<ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient"/>
    															</Storyboard>
    														</VisualState>
    														<VisualState x:Name="Disabled"/>
    													</VisualStateGroup>
    													<VisualStateGroup x:Name="CheckStates">
    														<VisualState x:Name="Checked">
    															<Storyboard>
    																<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundOverlay3"/>
    																<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Highlight"/>
    																<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundGradient2"/>
    																<ColorAnimation Duration="0" To="#E5FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient2"/>
    																<ColorAnimation Duration="0" To="#BCFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient2"/>
    																<ColorAnimation Duration="0" To="#6BFFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient2"/>
    																<ColorAnimation Duration="0" To="#F2FFFFFF" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="BackgroundGradient2"/>
    															</Storyboard>
    														</VisualState>
    														<VisualState x:Name="Unchecked"/>
    													</VisualStateGroup>
    													<VisualStateGroup x:Name="FocusStates">
    														<VisualState x:Name="Focused">
    															<Storyboard>
    																<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="FocusVisualElement">
    																	<DiscreteObjectKeyFrame KeyTime="0">
    																		<DiscreteObjectKeyFrame.Value>
    																			<Visibility>Visible</Visibility>
    																		</DiscreteObjectKeyFrame.Value>
    																	</DiscreteObjectKeyFrame>
    																</ObjectAnimationUsingKeyFrames>
    															</Storyboard>
    														</VisualState>
    														<VisualState x:Name="Unfocused"/>
    													</VisualStateGroup>
    												</VisualStateManager.VisualStateGroups>
    												<Rectangle x:Name="Background" Fill="{TemplateBinding Background}" RadiusY="3" RadiusX="3" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
    												<Rectangle x:Name="BackgroundOverlay" Fill="#FF448DCA" Opacity="0" RadiusY="3" RadiusX="3" Stroke="#00000000" StrokeThickness="{TemplateBinding BorderThickness}"/>
    												<Rectangle x:Name="BackgroundOverlay2" Fill="#FF448DCA" Opacity="0" RadiusY="3" RadiusX="3" Stroke="#00000000" StrokeThickness="{TemplateBinding BorderThickness}"/>
    												<Rectangle x:Name="BackgroundGradient" Margin="{TemplateBinding BorderThickness}" RadiusY="2" RadiusX="2" Stroke="#FFFFFFFF" StrokeThickness="1">
    													<Rectangle.Fill>
    														<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
    															<GradientStop Color="#FFFFFFFF" Offset="0"/>
    															<GradientStop Color="#F9FFFFFF" Offset="0.375"/>
    															<GradientStop Color="#E5FFFFFF" Offset="0.625"/>
    															<GradientStop Color="#C6FFFFFF" Offset="1"/>
    														</LinearGradientBrush>
    													</Rectangle.Fill>
    												</Rectangle>
    												<Rectangle x:Name="BackgroundOverlay3" Fill="#FF448DCA" Opacity="0" RadiusY="3" RadiusX="3" Stroke="#00000000" StrokeThickness="{TemplateBinding BorderThickness}"/>
    												<Rectangle x:Name="BackgroundGradient2" Margin="{TemplateBinding BorderThickness}" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#FFFFFFFF" StrokeThickness="1">
    													<Rectangle.Fill>
    														<LinearGradientBrush EndPoint=".7,1" StartPoint=".7,0">
    															<GradientStop Color="#FFFFFFFF" Offset="0"/>
    															<GradientStop Color="#F9FFFFFF" Offset="0.375"/>
    															<GradientStop Color="#E5FFFFFF" Offset="0.625"/>
    															<GradientStop Color="#C6FFFFFF" Offset="1"/>
    														</LinearGradientBrush>
    													</Rectangle.Fill>
    												</Rectangle>
    												<Rectangle x:Name="Highlight" IsHitTestVisible="false" Margin="{TemplateBinding BorderThickness}" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#FF6DBDD1" StrokeThickness="1"/>
    												<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
    												<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" RadiusY="3.5" RadiusX="3.5" Stroke="#FF6DBDD1" StrokeThickness="1" Visibility="Collapsed"/>
    											</Grid>
    										</ControlTemplate>
    									</Setter.Value>
    								</Setter>
    							</Style>
    						</Grid.Resources>
    						<VisualStateManager.VisualStateGroups>
    							<VisualStateGroup x:Name="CommonStates">
    								<VisualState x:Name="Normal"/>
    								<VisualState x:Name="MouseOver"/>
    								<VisualState x:Name="Disabled">
    									<Storyboard>
    										<DoubleAnimation Duration="00:00:00" To=".55" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="DisabledVisualElement"/>
    									</Storyboard>
    								</VisualState>
    							</VisualStateGroup>
    							<VisualStateGroup x:Name="FocusStates">
    								<VisualState x:Name="Focused">
    									<Storyboard>
    										<DoubleAnimation Duration="00:00:00" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusVisualElement"/>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="Unfocused"/>
    								<VisualState x:Name="FocusedDropDown">
    									<Storyboard>
    										<ObjectAnimationUsingKeyFrames Duration="00:00:00" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PopupBorder">
    											<DiscreteObjectKeyFrame KeyTime="00:00:00">
    												<DiscreteObjectKeyFrame.Value>
    													<Visibility>Visible</Visibility>
    												</DiscreteObjectKeyFrame.Value>
    											</DiscreteObjectKeyFrame>
    										</ObjectAnimationUsingKeyFrames>
    									</Storyboard>
    								</VisualState>
    							</VisualStateGroup>
    							<VisualStateGroup x:Name="ValidationStates">
    								<VisualState x:Name="Valid"/>
    								<VisualState x:Name="InvalidUnfocused">
    									<Storyboard>
    										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
    											<DiscreteObjectKeyFrame KeyTime="0">
    												<DiscreteObjectKeyFrame.Value>
    													<Visibility>Visible</Visibility>
    												</DiscreteObjectKeyFrame.Value>
    											</DiscreteObjectKeyFrame>
    										</ObjectAnimationUsingKeyFrames>
    									</Storyboard>
    								</VisualState>
    								<VisualState x:Name="InvalidFocused">
    									<Storyboard>
    										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ValidationErrorElement">
    											<DiscreteObjectKeyFrame KeyTime="0">
    												<DiscreteObjectKeyFrame.Value>
    													<Visibility>Visible</Visibility>
    												</DiscreteObjectKeyFrame.Value>
    											</DiscreteObjectKeyFrame>
    										</ObjectAnimationUsingKeyFrames>
    										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen" Storyboard.TargetName="validationTooltip">
    											<DiscreteObjectKeyFrame KeyTime="0">
    												<DiscreteObjectKeyFrame.Value>
    													<System:Boolean>True</System:Boolean>
    												</DiscreteObjectKeyFrame.Value>
    											</DiscreteObjectKeyFrame>
    										</ObjectAnimationUsingKeyFrames>
    									</Storyboard>
    								</VisualState>
    							</VisualStateGroup>
    						</VisualStateManager.VisualStateGroups>
    						<Border x:Name="ContentPresenterBorder">
    							<Grid>
    								<ToggleButton x:Name="DropDownToggle" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Right" Margin="0" Style="{StaticResource comboToggleStyle}" VerticalAlignment="Stretch">
    									<Path x:Name="BtnArrow" Data="F1 M 301.14,-189.041L 311.57,-189.041L 306.355,-182.942L 301.14,-189.041 Z " HorizontalAlignment="Right" Height="4" Margin="0,0,6,0" Stretch="Uniform" Width="8">
    										<Path.Fill>
    											<SolidColorBrush x:Name="BtnArrowColor" Color="#FF333333"/>
    										</Path.Fill>
    									</Path>
    								</ToggleButton>
    								<ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
    									<TextBlock Text=" "/>
    								</ContentPresenter>
    							</Grid>
    						</Border>
    						<Rectangle x:Name="DisabledVisualElement" Fill="White" IsHitTestVisible="false" Opacity="0" RadiusY="3" RadiusX="3"/>
    						<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="2" RadiusX="2" Stroke="#FF6DBDD1" StrokeThickness="1"/>
    						<Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
    							<ToolTipService.ToolTip>
    								<ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}">
    									<ToolTip.Triggers>
    										<EventTrigger RoutedEvent="Canvas.Loaded">
    											<BeginStoryboard>
    												<Storyboard>
    													<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible" Storyboard.TargetName="validationTooltip">
    														<DiscreteObjectKeyFrame KeyTime="0">
    															<DiscreteObjectKeyFrame.Value>
    																<System:Boolean>true</System:Boolean>
    															</DiscreteObjectKeyFrame.Value>
    														</DiscreteObjectKeyFrame>
    													</ObjectAnimationUsingKeyFrames>
    												</Storyboard>
    											</BeginStoryboard>
    										</EventTrigger>
    									</ToolTip.Triggers>
    								</ToolTip>
    							</ToolTipService.ToolTip>
    							<Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12">
    								<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0"/>
    								<Path Data="M 0,0 L2,0 L 8,6 L8,8" Fill="#ffffff" Margin="1,3,0,0"/>
    							</Grid>
    						</Border>
    						<Popup x:Name="Popup">
    							<Border x:Name="PopupBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3" HorizontalAlignment="Stretch" Height="Auto">
    								<Border.Background>
    									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    										<GradientStop Color="#FFFFFFFF" Offset="0"/>
    										<GradientStop Color="#FFFEFEFE" Offset="1"/>
    									</LinearGradientBrush>
    								</Border.Background>
    								<ScrollViewer x:Name="ScrollViewer" BorderThickness="0" Padding="1">
    									<ListBox x:Name="lstBox" SelectionMode="Multiple"
    										ItemsSource="{TemplateBinding ItemsSource}"
    										ItemContainerStyle="{StaticResource CheckBoxListBoxItemStyle}"
    										HorizontalAlignment="Stretch" />
    								</ScrollViewer>
    							</Border>
    						</Popup>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>

    </sdk:Page.Resources>

    <Grid x:Name="LayoutRoot" Background="White" >
        <Grid Margin="8">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock TextWrapping="Wrap" Text="Windows Azure SQL Database Backup Manager" Foreground="#FF0097FF" FontWeight="Bold" FontSize="26.667" VerticalAlignment="Top"/>
            <Grid Grid.Row="1">
                <sdk:TabControl>
                    <sdk:TabItem Header="Dashboard">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="2*"/>
                                <RowDefinition/>
                            </Grid.RowDefinitions>
                            <Grid Grid.ColumnSpan="2" Grid.Row="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <sdk:DataGrid Grid.Row="1" IsReadOnly="True" ItemsSource="{Binding AllDatabaseBackupLogs}" AutoGenerateColumns="False" SelectionMode="Single">
                                    <sdk:DataGrid.Columns>
                                        <sdk:DataGridTextColumn Binding="{Binding Date, Converter={StaticResource DateTimeOffsetStringConverter}}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Date" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="Auto"/>
                                        <sdk:DataGridTextColumn Binding="{Binding Message}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Message" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTemplateColumn Visibility="Collapsed" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" CellEditingTemplate="{x:Null}" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" HeaderStyle="{x:Null}" Header="Exception" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Width="Auto">
                                            <sdk:DataGridTemplateColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Button Content="Exception" />
                                                </DataTemplate>
                                            </sdk:DataGridTemplateColumn.CellTemplate>
                                        </sdk:DataGridTemplateColumn>
                                    </sdk:DataGrid.Columns>
                                </sdk:DataGrid>
                                <TextBlock TextWrapping="Wrap" Text="Log Messages" VerticalAlignment="Top" FontWeight="Bold"/>
                            </Grid>
                            <Grid Grid.Column="1" Margin="4,0,0,0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <sdk:DataGrid Grid.Row="1" IsReadOnly="True" ItemsSource="{Binding AllDatabaseBackups}" AutoGenerateColumns="False" SelectionMode="Single" SelectedItem="{Binding SelectedBackup, Mode=TwoWay}">
                                    <sdk:DataGrid.Columns>
                                        <sdk:DataGridTextColumn Binding="{Binding Start, Converter={StaticResource DateTimeOffsetStringConverter}}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Start" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTextColumn Binding="{Binding Finish, Converter={StaticResource DateTimeOffsetStringConverter}}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Finish" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTextColumn Binding="{Binding Status}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Status" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTemplateColumn CanUserSort="True" CanUserReorder="True" CanUserResize="True" Header="Download" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" Width="Auto">
                                            <sdk:DataGridTemplateColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Button Content="Download" Visibility="{Binding BackupUrl, Converter={StaticResource DownloadBackupVisibilityConverter}}" Command="{Binding DataContext.DownloadBackupCommand, RelativeSource={RelativeSource AncestorType=sdk:Page}}" CommandParameter="{Binding BackupUrl}" />
                                                </DataTemplate>
                                            </sdk:DataGridTemplateColumn.CellTemplate>
                                        </sdk:DataGridTemplateColumn>
                                    </sdk:DataGrid.Columns>
                                </sdk:DataGrid>
                                <TextBlock TextWrapping="Wrap" Text="Database Backups" VerticalAlignment="Top" FontWeight="Bold"/>
                            </Grid>
                            <Grid Margin="0,0,4,0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>
                                <sdk:DataGrid Grid.Row="1"  IsReadOnly="True" ItemsSource="{Binding AllDatabases}" AutoGenerateColumns="False" SelectionMode="Single" SelectedItem="{Binding SelectedDatabase, Mode=TwoWay}">
                                    <sdk:DataGrid.Columns>
                                        <sdk:DataGridTextColumn Binding="{Binding Server.Name}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Server" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTextColumn Binding="{Binding Name}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Database" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTextColumn Binding="{Binding LastBackup, Converter={StaticResource DateTimeOffsetStringConverter}}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Last Backup" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTextColumn Binding="{Binding Status}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Status" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                    </sdk:DataGrid.Columns>
                                </sdk:DataGrid>
                                <TextBlock TextWrapping="Wrap" Text="Servers &amp; Databases" VerticalAlignment="Top" FontWeight="Bold"/>
                            </Grid>
                        </Grid>
                    </sdk:TabItem>
                    <sdk:TabItem Header="Backup Tasks">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                                <ColumnDefinition Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <Grid Grid.Column="1" Visibility="{Binding EditingTask, Converter={StaticResource NotNullVisibilityConverter}}" >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                    <RowDefinition/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <StackPanel DataContext="{Binding EditingTask}">
                                    <TextBlock TextWrapping="Wrap" Text="Backup Task Detail" VerticalAlignment="Top" FontWeight="Bold"/>
                                    <TextBlock TextWrapping="Wrap" Text="Name" VerticalAlignment="Top"/>
                                    <TextBox TextWrapping="Wrap" Text="{Binding Name, Mode=TwoWay}" VerticalAlignment="Top"/>
                                    <CheckBox Content="Enabled" IsChecked="{Binding Enabled, Mode=TwoWay}" VerticalAlignment="Top"/>
                                </StackPanel>
                                <Grid Grid.Row="1" >
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <sdk:DataGrid Grid.Row="1" SelectedItem="{Binding SelectedTaskSchedule, Mode=TwoWay}" IsReadOnly="True" ItemsSource="{Binding EditingTask.Schedules}" AutoGenerateColumns="False" SelectionMode="Single">
                                        <sdk:DataGrid.Columns>
                                            <sdk:DataGridTemplateColumn CanUserSort="True" CanUserReorder="True" CanUserResize="True" Header="Type" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" Width="*" HeaderStyle="{StaticResource TaskScheduleHeaderStyle}">
                                                <sdk:DataGridTemplateColumn.CellTemplate>
                                                    <DataTemplate>
                                                    	<local:EditTaskScheduleUserControl/>
                                                    </DataTemplate>
                                                </sdk:DataGridTemplateColumn.CellTemplate>
                                            </sdk:DataGridTemplateColumn>
                                        </sdk:DataGrid.Columns>
                                    </sdk:DataGrid>
                                    <TextBlock TextWrapping="Wrap" Text="Schedules" VerticalAlignment="Top" FontWeight="Bold"/>
                                    <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
                                    	<Button Content="New" Command="{Binding AddTaskScheduleCommand}" />
                                        <Button Content="Delete" Command="{Binding RemoveTaskScheduleCommand}" />
                                    </StackPanel>
                                </Grid>
                                <Grid Grid.Row="2">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto"/>
                                        <RowDefinition/>
                                        <RowDefinition Height="Auto"/>
                                    </Grid.RowDefinitions>
                                    <sdk:DataGrid Grid.Row="1" SelectedItem="{Binding SelectedTaskAction, Mode=TwoWay}" IsReadOnly="True" ItemsSource="{Binding EditingTask.Actions}" AutoGenerateColumns="False" SelectionMode="Single">
                                        <sdk:DataGrid.Columns>
                                            <sdk:DataGridTextColumn Binding="{Binding Database.Server.Name}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Server" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                            <sdk:DataGridTextColumn Binding="{Binding Database.Name}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Database" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        </sdk:DataGrid.Columns>
                                    </sdk:DataGrid>
                                    <TextBlock TextWrapping="Wrap" Text="Backup Actions" VerticalAlignment="Top" FontWeight="Bold"/>
                                    <StackPanel Grid.Row="2" Margin="0,4,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Content="Include Database" Command="{Binding AddTaskActionCommand}" />
                                        <Button Content="Exclude Database" Command="{Binding RemoveTaskActionCommand}" />
                                    </StackPanel>
                                </Grid>
                                <StackPanel Grid.Row="3" Margin="0,20,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                                    <Button Content="Save Task" Command="{Binding SaveTaskCommand}" />
                                    <Button Content="Delete Task" Command="{Binding DeleteTaskCommand}" />
                                </StackPanel>
                            </Grid>
                            <Grid Margin="0,0,4,0">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <sdk:DataGrid Grid.Row="1"  IsReadOnly="True" ItemsSource="{Binding AllTasks}" AutoGenerateColumns="False" SelectionMode="Single" SelectedItem="{Binding SelectedTask, Mode=TwoWay}">
                                    <sdk:DataGrid.Columns>
                                        <sdk:DataGridTextColumn Binding="{Binding Name}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Name" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTextColumn Binding="{Binding Last Execution, Converter={StaticResource DateTimeOffsetStringConverter}}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Last Execution" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="Auto"/>
                                        <sdk:DataGridTextColumn Binding="{Binding Enabled}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Enabled" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="Auto"/>
                                    </sdk:DataGrid.Columns>
                                </sdk:DataGrid>
                                <TextBlock TextWrapping="Wrap" Text="Tasks" VerticalAlignment="Top" FontWeight="Bold"/>
                                <Button Grid.Row="2" Content="New" Margin="0,4,0,0" HorizontalAlignment="Right" Command="{Binding NewTaskCommand}"/>
                            </Grid>
                        </Grid>
                    </sdk:TabItem>
                    <sdk:TabItem Header="SQL Servers">
                        <Grid Background="White">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto"/>
                                    <RowDefinition/>
                                    <RowDefinition Height="Auto"/>
                                </Grid.RowDefinitions>
                                <sdk:DataGrid Grid.Row="1" IsReadOnly="True" ItemsSource="{Binding AllServers}" AutoGenerateColumns="False" SelectionMode="Single">
                                    <sdk:DataGrid.Columns>
                                        <sdk:DataGridTextColumn Binding="{Binding Name}" CanUserSort="True" CanUserReorder="True" CellStyle="{x:Null}" CanUserResize="True" ClipboardContentBinding="{x:Null}" DisplayIndex="-1" DragIndicatorStyle="{x:Null}" EditingElementStyle="{x:Null}" ElementStyle="{x:Null}" Foreground="{x:Null}" FontWeight="Normal" FontStyle="Normal" HeaderStyle="{x:Null}" Header="Server" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0" SortMemberPath="{x:Null}" Visibility="Visible" Width="*"/>
                                        <sdk:DataGridTemplateColumn CanUserSort="True" CanUserReorder="True" CanUserResize="True" Header="" IsReadOnly="True" MaxWidth="Infinity" MinWidth="0" Width="Auto">
                                            <sdk:DataGridTemplateColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Button Content="Edit" Command="{Binding DataContext.EditSqlServerCommand, RelativeSource={RelativeSource AncestorType=local:BackupManagerPage}}" CommandParameter="{Binding}" Margin="4,0"/>
                                                </DataTemplate>
                                            </sdk:DataGridTemplateColumn.CellTemplate>
                                        </sdk:DataGridTemplateColumn>
                                        <sdk:DataGridTemplateColumn CanUserSort="True" CanUserReorder="True" CanUserResize="True" Header="" IsReadOnly="True" MaxWidth="Infinity" MinWidth="0" Width="Auto">
                                            <sdk:DataGridTemplateColumn.CellTemplate>
                                                <DataTemplate>
                                                    <Button Content="Remove" Command="{Binding DataContext.RemoveSqlServerCommand, RelativeSource={RelativeSource AncestorType=local:BackupManagerPage}}" Margin="4,0" CommandParameter="{Binding}"/>
                                                </DataTemplate>
                                            </sdk:DataGridTemplateColumn.CellTemplate>
                                        </sdk:DataGridTemplateColumn>
                                    </sdk:DataGrid.Columns>
                                </sdk:DataGrid>
                                <TextBlock TextWrapping="Wrap" Text="Sql Servers references" VerticalAlignment="Top" FontWeight="Bold"/>
                                <StackPanel Grid.Row="2" Margin="0,4,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
                                    <Button Content="Add Server reference" Command="{Binding AddSqlServerCommand}" />
                                </StackPanel>
                            </Grid>
                        </Grid>
                    </sdk:TabItem>
                </sdk:TabControl>
            </Grid>
            <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="0 4 0 0" VerticalAlignment="Top">
                <Button Command="{Binding UpdateCommand}" Content="{Binding UpdateStatus}" Margin="0 0 4 0" VerticalAlignment="Center" Width="200" IsEnabled="{Binding IsRefreshEnabled}" />
            </StackPanel>
        </Grid>
    </Grid>
</sdk:Page>